package com.youlai.boot.modules.warehouse.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.youlai.boot.modules.warehouse.model.Warehouse;
import com.youlai.boot.modules.warehouse.model.WarehouseForm;
import com.youlai.boot.modules.warehouse.model.WarehouseVO;
import com.youlai.boot.modules.warehouse.model.ProductWarehousePageQuery;

public interface WarehouseService extends IService<Warehouse> {
    Page<WarehouseVO> getWarehousePage(String name, int pageNum, int pageSize);

    WarehouseVO getWarehouseById(Long id);

    Long saveWarehouse(WarehouseForm form);

    void updateWarehouse(WarehouseForm form);

    boolean deleteWarehouse(Long id);

    Page<WarehouseVO> getProductWarehousePage(Long productId, ProductWarehousePageQuery query);

    boolean saveProductWarehouse(Long productId, Long warehouseId);

    boolean deleteProductWarehouse(Long productId, Long warehouseId);
}